import amesu from "../../model/bot/amesu";
import browser, { tempDir } from "../../model/browser/browser";
import func from "../../model/func";
import { prop_min_type } from "../../shared/interface";
import { MsgAction, Tpl_shop_default } from "../../shared/master/MsgAction";
import { style_default } from "../../style/default";

export default async function (data: MsgAction) {
    let d = data.data as Tpl_shop_default;

    let style = new style_default();
    style.setTitle(d.title)
    if (d.desc && d.desc.length > 1) {
        style.addLine(`📄${d.desc}`)
    }
    for (let i = 0; i < d.list.length; i++) {
        const element = d.list[i];
        const idx = i;
        if (!element) {
            continue;
        }
        if (element.cont == 1) {
            style.addLine(`${func.getNumIcon(idx)}${element.name}💰️${func.BN(element.price)}`)
        } else {
            style.addLine(`${func.getNumIcon(idx)}${element.name}X${element.cont}💰️${func.BN(element.price)}`)
        }
    }
    style.addLine(`⚠️sb TX 判断技能装备名称违规`)
    style.setline_Title(`帮助`, '✨')
    style.addLine(`🔎查看:${d.tips_look} + ID`)
    style.addLine(`💰购买:${d.tips_buy} + ID`)

    style.toimg(data.tolocation)
}